package cate.common.table.pvp.crossboss;

import cate.common.table.ESheet;

import java.util.ArrayList;
import java.util.List;

public class CrossBossCookSheet extends ESheet<CrossBossCookRow> {
    public List<Byte> types = new ArrayList<>();

    @Override
    public String getSheetName() {
        return "佳肴美馔";
    }

    @Override
    public void onRowCreated(CrossBossCookRow row){
        if (!types.contains(row.type)) {
            types.add(row.type);
        }
    }

    public CrossBossCookRow getRow(byte type, int times){
        for (CrossBossCookRow row : getList()) {
            if (type == row.type && times == row.times) {
                return row;
            }
        }
        return null;
    }
}
